package HomeWork;



public class Wanzs {

    public static void main(String[] args) {

        for (int i = 1; i <101 ; i++) {
            int count=0;
            for (int j = 1; j <i; j++) {
                if (i%j==0){
                    count+=j;

                }
            }
            if(count==i){
                System.out.println(count);
                System.out.println(i);
            }
        }
    }
}